package vcp.gui.panels;

import javax.swing.JPanel;
import javax.swing.BoxLayout;
import javax.swing.JLabel;

import java.awt.Font;
import java.awt.Color;

import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;

import java.awt.BorderLayout;

import javax.swing.JButton;

import vcp.gui.components.VCPPanel;
import vcp.test.entities.User;

import java.awt.GridLayout;
import java.awt.FlowLayout;

public class TopMainScreen extends JPanel {
	private JButton btnSubscribe;
	private JButton btnLogin;
	private JButton btnLogout;
	/**
	 * Create the panel.
	 */
	public TopMainScreen(String role) {
		    String title = "Customer";
		    VCPPanel btnPnl = new VCPPanel();
		    btnPnl.setLayout(new BorderLayout());
		    Color cdbrown = Color.decode("#593E1A");
			setBackground(cdbrown);
		    
			setLayout(new BorderLayout(0, 0));
			
		    if(role!=null){
		    	title = role;
		    	btnLogout = new JButton("logout");
		    	btnPnl.add(btnLogout, BorderLayout.LINE_END);
		    }else{
		    	btnSubscribe = new JButton("Subscribe");
				btnLogin = new JButton("login");
				btnPnl.add(btnSubscribe, BorderLayout.LINE_START);
				btnPnl.add(btnLogin, BorderLayout.LINE_END);
		    }
		    JLabel lblVCP = new JLabel(title);
			lblVCP.setForeground(Color.WHITE);
			lblVCP.setFont(new Font("Tahoma", Font.BOLD, 25));
			add(lblVCP, BorderLayout.LINE_START);	
			add(btnPnl, BorderLayout.LINE_END);
	}

	public JButton getBtnLogout() {
		return btnLogout;
	}

	public void setBtnLogout(JButton btnLogout) {
		this.btnLogout = btnLogout;
	}

	public JButton getBtnLogin() {
		return btnLogin;
	}

	public void setBtnLogin(JButton btnLogin) {
		this.btnLogin = btnLogin;
	}

	public JButton getBtnSubscribe() {
		return btnSubscribe;
	}

	public void setBtnSubscribe(JButton btnSubscribe) {
		this.btnSubscribe = btnSubscribe;
	}

}
